home *** CD-ROM | disk | FTP | other *** search
- global gModeState, gGlobalStepCount, gLocalStepCount, gAlphaState, oINTERfaceUpdate, gSearchState, oIndexMediator, gFTsearchscope, gCHROisScrolling, gDefaultBar1, gDefaultBar2, oINTERfaceFind, gExtraSpeed, gSpeedResources, oIndexScroller, oIndexSlider, oTextScroller, oHelpRoll, gPuppetStorage, gVisiList, gImInHelp, gPDL, gTopicBase, gActiveResTopWin, gthumbn1spr, gthumbn5spr, oTextSlider, gIndxScrollFldK, gTheFTword, oVidCD, oImport, oTopicControl, gHoldSearchInfo, gInputFieldSpr, gOurFontK, gSavedMouseUpScript, gFindBase, gSavedMouseUpScriptforhelp, gPlaying, gPlayAll
-
- on hInitMode
- set gModeState to #ENCY
- set gSearchState to #ENTRY
- end
-
- on hSetMode pTowhat
- if pTowhat <> gModeState then
- hputmsg(">hSetMode: • to" && pTowhat && "in frame " & the frame)
- hSayProgress(#ACC)
- set the mouseDownScript to "hMouseEventSupervisor"
- set the mouseUpScript to gSavedMouseUpScript
- hCallHltModes(pTowhat)
- set gCHROisScrolling to 0
- set the visible of sprite gTopicBase to 0
- set vLeavingTopics to gModeState = #TOPICS
- if pTowhat = #ENCY then
- set gTheFTword to EMPTY
- end if
- mClearCanProButts(oVidCD)
- hCallClear()
- set gModeState to pTowhat
- hSetGlobalCounter(1)
- hSetAlphaState(EMPTY)
- hUpdateWin()
- hResetMediaButts()
- hFlushPriorParamsNEW()
- go(label(string(gModeState)) + 1)
- hSetupThumbs()
- mCheckHeader(oINTERfaceFind)
- mHomeTxtScroll(oTextScroller)
- if vLeavingTopics then
- mShowTopicVisibles(oTopicControl)
- end if
- mReDefineSlider(oIndexSlider, 1, mGetModesMaxEntryNum(oIndexMediator) - 6, 1)
- end if
- if gModeState = #FoundSet then
- mPrepScrollStats(oTextScroller)
- set Lbutnum to hMatchButtToType(mWhatFSlistType(oIndexScroller))
- mHltfromScripts(oINTERfaceUpdate, Lbutnum)
- end if
- mNudgeSlider(oIndexSlider, 0)
- end
-
- on hMatchButtToType pType
- if (pType = 0) or (pType = 1) then
- return 2
- else
- if pType = 2 then
- return 1
- else
- if pType = 3 then
- return 1
- end if
- end if
- end if
- end
-
- on hFlushPriorParams
- mClearIndexParams(oIndexScroller)
- mUpdateIndexParams(oIndexMediator)
- hPurgeMedia()
- end
-
- on hFlushPriorParamsNEW
- mClearIndexParams(oIndexScroller)
- mUpdateIndexParams(oIndexMediator)
- end
-
- on hSwitchScopeStuff pCode, pValue
- if pCode = 22 then
- hSwitchFTsearchscope(pValue)
- else
- if pCode = 14 then
- hSwitchSearchState(pValue)
- end if
- end if
- end
-
- on hSwitchFTsearchscope pSomeThing
- if symbolp(pSomeThing) then
- if not (pSomeThing = #FoundSet) then
- set gFTsearchscope to pSomeThing
- end if
- if pSomeThing = #EPISSUB then
- set gFTsearchscope to #EPIS
- end if
- else
- if pSomeThing = 1 then
- set gFTsearchscope to #ENCY
- else
- if pSomeThing = 2 then
- set gFTsearchscope to #EPIS
- else
- if pSomeThing = 3 then
- set gFTsearchscope to #CHRO
- else
- if pSomeThing = 4 then
- set gFTsearchscope to #ALL
- else
- if pSomeThing = 5 then
- set gFTsearchscope to #FoundSet
- end if
- end if
- end if
- end if
- end if
- end if
- end
-
- on hSwitchSearchState pWhat
- if pWhat = 1 then
- set gSearchState to #ENTRY
- else
- set gSearchState to #word
- end if
- end
-
- on hSetAlphaState pTowhat
- if pTowhat <> gAlphaState then
- set gAlphaState to pTowhat
- else
- end if
- end
-
- on hResetResMode
- global gAssetPath
- set the fileName of cast the number of cast "BlankM.DIR" to the pathName & "BL" & gPDL & "BlankM.DIR"
- end
-
- on hHideThumbs
- repeat with x = gthumbn1spr to gthumbn5spr
- set the visible of sprite x to 0
- end repeat
- updateStage()
- end
-
- on hReVisThumbs
- repeat with x = gthumbn1spr to gthumbn5spr
- set the visible of sprite x to 1
- end repeat
- updateStage()
- end
-
- on hGoHelp
- puppetSprite(18, 0)
- set gSavedMouseUpScript to the mouseUpScript
- set the mouseUpScript to EMPTY
- set gImInHelp to 1
- hHelpWinClose()
- hStoreLockWins()
- if gHoldSearchInfo = 1 then
- set the editableText of sprite gInputFieldSpr to 0
- end if
- set gSavedMouseUpScriptforhelp to the keyDownScript
- set the keyDownScript to EMPTY
- hAnnounce("On line help")
- hStorePuppets()
- hStoreVisibles()
- set the textStyle of field "HelpIndex" to "plain"
- set the textStyle of line 1 of field "HelpIndex" to "Bold"
- go("Help0")
- mSetHelpMode(oHelpRoll, gModeState)
- end
-
- on hLeaveHelp
- set gImInHelp to 0
- hClearPuppets()
- if the soundBusy of 1 then
- puppetSound(0)
- end if
- set the visible of sprite 39 to 1
- go(label(string(gModeState)))
- hRestorePuppets()
- hRestoreVisibles()
- if gModeState <> #TOPICS then
- hRestoreLockWins()
- end if
- if gHoldSearchInfo = 1 then
- set the editableText of sprite gInputFieldSpr to 1
- end if
- set the keyDownScript to gSavedMouseUpScriptforhelp
- end
-
- on hClearPuppets
- repeat with x = 1 to 48
- if the puppet of sprite x then
- puppetSprite(x, 0)
- end if
- end repeat
- end
-
- on hStorePuppets
- set gPuppetStorage to [:]
- repeat with x = 1 to 48
- if the puppet of sprite x then
- set vPuppetdata to list(the castNum of sprite x, the locH of sprite x, the locV of sprite x)
- addProp(gPuppetStorage, x, vPuppetdata)
- puppetSprite(x, 0)
- end if
- end repeat
- updateStage()
- end
-
- on hRestorePuppets
- set vListlen to count(gPuppetStorage)
- if vListlen then
- repeat with x = 1 to vListlen
- set vSprite to getPropAt(gPuppetStorage, x)
- puppetSprite(vSprite, 1)
- set vPuppetdata to getAt(gPuppetStorage, x)
- set the castNum of sprite vSprite to getAt(vPuppetdata, 1)
- set the locH of sprite vSprite to getAt(vPuppetdata, 2)
- set the locV of sprite vSprite to getAt(vPuppetdata, 3)
- end repeat
- updateStage()
- end if
- if gHoldSearchInfo = 1 then
- set the editableText of sprite gInputFieldSpr to 1
- end if
- end
-
- on hStoreVisibles
- set gVisiList to []
- repeat with x = 1 to 48
- if not (the visible of sprite x) then
- add(gVisiList, x)
- set the visible of sprite x to 1
- end if
- end repeat
- updateStage()
- end
-
- on hRestoreVisibles
- set vListlen to count(gVisiList)
- if vListlen then
- repeat with x = 1 to vListlen
- set the visible of sprite getAt(gVisiList, x) to 1
- updateStage()
- end repeat
- end if
- end
-
- on hTrapPlayback
- if the clickOn <> gFindBase then
- go(label("RESOURCES"))
- else
- return
- end if
- end
-
- on hGoTopicEdit
- set gSavedMouseUpScript to the mouseUpScript
- set the mouseUpScript to EMPTY
- hHelpWinClose()
- hStoreLockWins()
- if gModeState = #TOPICS then
- if string(the windowList) contains gActiveResTopWin then
- hCloseTopWin()
- forget(window gActiveResTopWin)
- end if
- set the visible of sprite gTopicBase to 0
- mClearTopHlt(oINTERfaceTopicControl)
- end if
- if gHoldSearchInfo = 1 then
- set the editableText of sprite gInputFieldSpr to 0
- end if
- set gSavedMouseUpScriptforhelp to the keyDownScript
- set the keyDownScript to EMPTY
- if gModeState = #Resources then
- hResetResMode()
- end if
- hStorePuppets()
- hStoreVisibles()
- mReport(oImport, "Preparing...")
- go("TopicEditStart")
- end
-
- on hLeaveTopicEdit
- hClearPuppets()
- if the soundBusy of 1 then
- puppetSound(0)
- end if
- mReport(oImport, "Resuming main program...")
- go(label(string(gModeState)))
- hRestorePuppets()
- repeat with x = 21 to 24
- set the visible of sprite x to 1
- end repeat
- hRestoreVisibles()
- if gModeState <> #TOPICS then
- hRestoreLockWins()
- end if
- if gHoldSearchInfo = 1 then
- set the editableText of sprite gInputFieldSpr to 1
- end if
- set the keyDownScript to gSavedMouseUpScriptforhelp
- if (gModeState = #TOPICS) or (gModeState = #Resources) then
- if gModeState = #TOPICS then
- mGetPage(oIndexScroller)
- hRecall(#TOPICS)
- end if
- set the mouseUpScript to gSavedMouseUpScript
- set gSavedMouseUpScript to EMPTY
- end if
- end
-